﻿//-------------------------------------------------------------------------
///-----------------路径管理----------------------------------------------
///-----------------程序路径管理类-----------------------------------------
///-----------------2022/4/22---by mky.蒙克雨------------------------------
//-------------------------------------------------------------------------
#pragma once

//-------------------------------------------------------------------------
#ifndef _CLASS_FILEMGR_H
#define _CLASS_FILEMGR_H

//-------------------------------------------------------------------------
#include <string>
#include <unistd.h>
#include<vector>
//-------------------------------------------------------------------------
namespace mv {
	using namespace std;
	//-------------------------------------------------------------------------
	class FileMgr {
	public:
		FileMgr();
		~FileMgr();
	public:
		std::string getCurPath(); 
		std::string getLastElement(std::string str, const std::string& separator);
		std::string getFirstElement(std::string str, const std::string& separator);
		std::string getMd5ValueByMd5File(std::string file);
		std::vector<std::string> stringSplit(const std::string& str, char delim);
		int getFileSize(const string& fname);
		bool isFileExists_access(const string& name) {
			return (access(name.c_str(), F_OK) != -1);
		};
		
	private:
		std::string m_pCurPath="";
	};

	//-------------------------------------------------------------------------
}

//-------------------------------------------------------------------------
#endif //!_CLASS_IPCECHOSESSION_H




























